#include <iostream>
#include <string>
using namespace std;

class Student {
public:
    Student(){};
    Student(int n, string na, char se)
    {
        num = n;
        name = na;
        sex = se;
    };
    ~Student(){};
    void display();
    void get_value();
protected:
    int test;
protected:
    int num;
    string name;
    char sex;
};

class Student1 : public Student {
public:
    Student1(){};
    ~Student1(){};
    void display1();
    void get_value1();
private:
    int age;
    string addr;
};

class Student2 : private Student {
public:
    Student2(){};
    ~Student2(){};
    void display2();
    void get_value2();
private:
    int age;
    string addr;
};
class Student3 : protected Student {
public:
    Student3(){};
    ~Student3(){};
    void display3();
    void get_value3();
private:
    int age;
    string addr;
};

class Student5 : public Student {
public:
    Student5(){};
    Student5(int num, string name, char sex, int a, string add) : Student(num, name, sex)
    {
        age = a;
        addr = add;
    }
    void display();
private:
    int age;
    string addr;
};

class Student6 : public Student {
public:
    Student6(){};
    ~Student6(){};
    Student6(int num, string name, char sex, int age, string addr) : Student(num, name, sex) , monitor(num, name, sex)
    {
        age6 = age;
        addr6 = addr;
    }
    void display();
    void display_monitor();
private:
    int age6;
    string addr6;
    Student monitor;
};

class Student7 : public Student {
public:
    Student7(int num, string name, char sex, int age) : Student(num, name, sex)
    {
        age7 = age;
    }
    void show()
    {
        display();
        cout << " age7 =" << age7 << endl;
    }
private:
    int age7;
};

class Student8 : public Student7 {
public:
    Student8(int num, string name, char sex, int age, int score) : Student7(num, name, sex, age)
    {
        score8 = score;
    }
    void show_all()
    {
        show();
        cout << " score8 = " << score8 << endl;
    }
private:
    int score8;
};

class Person {
public:
    Person(string na, int a, char se)
    {
        name = na;
        age = a;
        sex = se;
    }
protected:
    string name;
    int age;
    char sex;
};

class Student9 : virtual public Person {
public:
    Student9(string name, int age, char sex, int sc) : Person(name, age, sex)
    {
        score = sc;
    }
protected:
    int score;
};

class Teacher : virtual public Person {
public:
    Teacher(string name, int age, char sex, char ti) : Person(name, age, sex)
    {
        title = ti;
    }
protected:
    char title;
};

class Graduate : public Teacher, public Student9 {
public:
    Graduate(string name, int age, char title, char sex, int score) : Teacher(name, age, sex, title), Student9(name, age, sex, score)
    ,Person(name, age, sex){};
    void show()
    {
        cout << "name = " << name << " sex = " << sex << " age = " << age;
        cout << " title = " << title << " score = " << score << endl; 
    }
};

class Student10 {
public:
    Student10(int nu, string na, int sc) {
        num = nu;
        name = na;
        score = sc;
    }
    void show()
    {
        cout << "this is Student10" << endl;
        cout << "num = " << num << " name = " << name;
        cout << " score = " << score << endl;
    }
protected:
    int num;
    string name;
    int score;
};

class Graduate1 : public Student10 {
public:
    Graduate1(int nu, string na, int sc, int pa) : Student10(nu, na, sc)
    {
        pay = pa;
    }
    void show()
    {
        cout << "this is Graduate1" << endl;
        cout << "name = " << name << " num = " << num;
        cout << " score = " << score << " pay = " << pay << endl;
    }
private:
    int pay;
};